package com.hydra.auth.service;

import com.hydra.auth.dto.ModifyPassDto;
import com.hydra.auth.dto.RegisterDto;
import com.hydra.base.dto.auth.AuthUser;
import com.hydra.auth.entity.SysUser;
import com.hydra.base.resp.BaseResult;

import java.awt.image.BufferedImage;

/**
 * 用户服务的接口
 * @Author Hydra
 * @Date 2022/5/27 13:26
 */
public interface LoginService {

    /**注册*/
    SysUser register(RegisterDto data);

    BufferedImage getValidateCode(String key);

    void validateCode(String validateCode, String uuid);

    /**忘记密码*/
    BaseResult<Boolean> modifyPassword(ModifyPassDto data);

//    SysUser getUserInfo();

    AuthUser getAuthUser();

    SysUser modifyPassword(SysUser user, String password);

    SysUser findUser(SysUser user);
    SysUser findByUsername(String target);
    SysUser findByPhone(String target);

    SysUser findByEmail(String target);
}
